package com.kl.forum.util;

import com.aliyun.oss.ClientException;
import com.aliyun.oss.OSSClient;
import com.aliyun.oss.OSSException;
import com.aliyun.oss.model.PutObjectResult;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;

public class OssUtil {


    public static String up(File file) {
        // Endpoint以杭州为例，其它Region请按实际情况填写。
        String endpoint = "oss-cn-beijing.aliyuncs.com";
        // 阿里云主账号AccessKey拥有所有API的访问权限，风险很高。强烈建议您创建并使用RAM账号进行API访问或日常运维，请登录 https://ram.console.aliyun.com 创建RAM账号。
//        String accessKeyId = PropKit.get("accessKeyId");
//        String accessKeySecret = PropKit.get("accessKeySecret");
        String accessKeyId = "LTAIDdbtIB3OLRMp";
        String accessKeySecret = "1Dwb5NNhhjYoJmgSCfYj6RUHdYyBNC";
        // 创建OSSClient实例。
        OSSClient ossClient = new OSSClient(endpoint, accessKeyId, accessKeySecret);
//        boolean b = ossClient.doesBucketExist("ran74");
//        System.out.println(b);
        // 上传字符串。
        String content = "Hello OSS";
        String name = uuidstr();
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        String dateStr = format.format(new Date());
        String fileUrl = dateStr + "/" +name +file.getName();
//        PutObjectResult result = ossClient.putObject("kl-forum-test", name, file);
        try {
//            PutObjectResult result = ossClient.putObject("kl-forum-test", fileUrl, file);
            PutObjectResult result = ossClient.putObject("rans-7900", fileUrl, file);
        }catch (OSSException oe){
            System.out.println("Caught an OSSException, which means your request made it to OSS, "
                    + "but was rejected with an error response for some reason.");
            System.out.println("Error Message: " + oe.getErrorCode());
            System.out.println("Error Code:       " + oe.getErrorCode());
            System.out.println("Request ID:      " + oe.getRequestId());
            System.out.println("Host ID:           " + oe.getHostId());
        }catch (ClientException ce){
            System.out.println("Caught an ClientException, which means the client encountered "
                    + "a serious internal problem while trying to communicate with OSS, "
                    + "such as not being able to access the network.");
            System.out.println("Error Message: " + ce.getMessage());
        }
        finally {
            if (ossClient != null) {
                // 关闭Client。
                ossClient.shutdown();
            }
        }

//        https://rans-7900.oss-cn-beijing.aliyuncs.com/
        return "https://rans-7900.oss-cn-beijing.aliyuncs.com/"+ fileUrl;
//        return "https://kl-forum-test.oss-cn-beijing.aliyuncs.com/"+ fileUrl;
    }

    public static String uuidstr() {
        UUID uuid = UUID.randomUUID();
        String str = uuid.toString();
        String uuidStr = str.replace("-", "");
        return uuidStr;
      }


    public static void main(String[] args) {
//        up(base64ToFile("/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAIAAgADASIAAhEBAxEB/8QAHAAAAgIDAQEAAAAAAAAAAAAAAAIDBAUGBwgB/8QASBAAAgECBAQCBwUEBwYGAwAAAAIDBBIBBSIyBhNCUhFiBxQhIzNyghUxQ1OSJEFhohY0UWNxgZEIJURUssIXJjVzodGDk/D/xAAaAQEBAQEBAQEAAAAAAAAAAAAAAgMEAQUG/8QAJxEBAQACAQQBBQEBAQEBAAAAAAIDEgQFEyIyFAERFUJSIzNicjH/2gAMAwEAAhEDEQA/APUYABKQAAAAAAAAAAAAAAAAACAA4CAA4CAA4gCOygS+OkV3t6jFV2bQUvxZ0U1fM+MkV7aeLmnPl5eLE3xcXLbeufh4e3+UpVeYwQNrlVDmVdxJmFVsblJ5DEvLPLqlldz5OXrOj6OLpf8ATp1dxTRwbG5vymvTcZM7fssF5pv61JUXRuc+dl6pky+ruxdNmWeqeKK2V9LcrymPfOK6XfOVOVs0j2nHfKyW6o4+KCPVTt+K/wCoidmbezuWLQdTPfI10xq9oJEWkiB18p5vkXHbhSeIdFLVoconyeXf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vhgy4+zHDHDxwMnDT4R4eGHhhh/Am0ghPlTTxkYezD2C4QQ4T4zYRR4TY4eGMluF2OH+P3jDhJD5NCkuGGD4Y+OH3Yq2K44f4Y4e0kACKCBIFxwjwbVj444s2LY44/wAcccfE+wxJCuKxrbhi2LY/xxxx8ccf9cSQAAqSZbRSzPLNSQSyPj4s0iYNjj7PD78f4YYewtgBFBTw093JjVMG8PHBfZh7MPDDww+7D2YfuIXy6jfHxkpYXxw8fa64Nj7ccccfbj/HHHH/ADLYAVo6CkjR0jpYFV8PB8MEwwwbD+JH9lZd/wAhSf8A6V/+i6AEK00SwyRYJhhHJ44svjj7fH7yKTLqKR8XkpKd3x+9mjwxxx/zLYARwQxU8eEcEaRph7cFTDDDD/QkAAP/2Q=="));
    }

    /**
     * MultipartFile 转 File
     * @param file
     * @throws Exception
     */
    public static File multipartFileToFile( MultipartFile file ) throws Exception {
        File toFile = null;
        if(file.equals("")||file.getSize()<=0){
            file = null;
        }else {
            InputStream ins = null;
            ins = file.getInputStream();
            toFile = new File(file.getOriginalFilename());
            inputStreamToFile(ins, toFile);
            ins.close();
            File del =new File(toFile.toURI());
            del.delete();
        }
        return  toFile;
    }

//    /**
//     * File 转 MultipartFile
//     * @param file
//     * @throws Exception
//     */
//    public static void fileToMultipartFile( File file ) throws Exception {
//
//        FileInputStream fileInput = new FileInputStream(file);
//        MultipartFile toMultipartFile = new MockMultipartFile("file",file.getName(),"text/plain", IOUtils.toByteArray(fileInput));
//        toMultipartFile.getInputStream();
//
//    }


    public static void inputStreamToFile(InputStream ins, File file) {
        try {
            OutputStream os = new FileOutputStream(file);
            int bytesRead = 0;
            byte[] buffer = new byte[8192];
            while ((bytesRead = ins.read(buffer, 0, 8192)) != -1) {
                os.write(buffer, 0, bytesRead);
            }
            os.close();
            ins.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }


}
